<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
</head>
<body>
<a href="#" id="clickMe" οnclick="alert('clicked');">link</a>
<script>
    $(function(){
        setInterval(function(){
            var buy = document.getElementById('clickMe');//给你的a标签加一个id :btnBuy
            buy.click();
        },1000)//后面的500是以毫秒为单位。
    });
</script>
</body>
</html>